﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="lb_selectFile.aspx.cs" Inherits="lb_selectFile" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<style type="text/css"> 
div.RoundedCorner{background: #5AAE18} 
b.rtop, b.rbottom{display:block;background: #FFF} 
b.rtop b, b.rbottom b{display:block;height: 1px;overflow: hidden; background: #5AAE18} 
b.r1{margin: 0 4px} 
b.r2{margin: 0 3px} 
b.r3{margin: 0 2px} 
b.rtop b.r4, {margin: 0 1px;height: 1px}
.style1 {	font-size: 13px;
	color: #FFFFFF;
font-weight: bold;
} 
</style>
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript">
<!--
function dis(){
document.form1.submit.value=' 查询..'
document.form1.submit.disabled=true;
return true;
}
//-->
</script>
<head>
<title></title>
<link href="../css/textarea.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.tx {height: 16px; width: 30px; border-color: black black #000000; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px; font-size: 9pt; background-color: #eeeeee; color: #0000FF}
.tx1 {height: 20px; width: 30px; font-size: 9pt; border: 1px solid; border-color: black black #000000; color: #0000FF}
-->
</style>
<style type="text/css">
<!--
.style2 {font-size: 12px}
.style5 {color: #000000; font-size: 12px; }
.style6 {font-weight: bold}
.style8 {font-size: 12px; font-weight: bold; }
.style9 {color: #999999}
body {
	margin-top: 2px;
}
.style12 {color: #FF0000}
-->
</style>
<link href="../css/link1.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="99%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="740"><form name="form1" method="post" action="showdepartment.aspx">
          <div align="right">
            <input name="q" type="text" id="q"/>
            <input name="submit" type="submit" id="submit" style="FONT-SIZE: 12px; HEIGHT: 27px"  value= " 查 询 " />
            &nbsp;&nbsp;
          </div>
        </form></td>
        <td width="97" valign="top"><img src="../images/gx/up.gif" width="18" height="21"><a href="lb_upload.aspx"> 上传共享</a></td>
        <td width="142" valign="top"><img src="../images/gx/code.gif" width="21" height="21"><a href="lb_adminupload.aspx"> 管理共享</a></td>
      </tr>
    </table></td>
  </tr>
</table>
<div class="RoundedCorner"> 
  <div align="center"><b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b> <span class="style1">共 享 列 表</span></div>
</div>
    <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#5AAE18">
      <tr bgcolor="#FFFFFF">
        <td height="21" colspan="8"><table width="100%" border="0" cellpadding="3" cellspacing="0">
          <tr>
                 
            <td height="16">
                  <%
                      System.Collections.Generic.IList<COM.OA.Entity.filetype> flist = COM.OA.BLL.filetypeBLL.Select();
                      
                      foreach(COM.OA.Entity.filetype ftype in flist)
                      {
                       
                  %>
                  <a href="showdepartment.aspx?ft=<%=ftype.ftype_id %>"><%=ftype.ftype_filetype%></a>&nbsp;
                  <%
                      }    
                   %>
               </td>
          </tr>
        </table></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td height="21" colspan="8"><table width="100%" border="0" cellpadding="3" cellspacing="0">
          <tr>
            <td>
                <%
                    System.Collections.Generic.IList<COM.OA.Entity.department> deparList =
                        COM.OA.BLL.departmentBLL.Select();
                    foreach (COM.OA.Entity.department dpt in deparList)
                    {
                        
                %>
                  <a href="showdepartment.aspx?dt=<%=dpt.dept_id %>"><%=dpt.dept_department %></a>&nbsp;
              <%
                    }         
                %>
                  
              
</td>
          </tr>
        </table></td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td height="21"><div align="center" class="style2 style6">
            <div align="left">&nbsp;文件名</div>
        </div></td>
        <td><div align="center"><strong>大 小</strong></div></td>
        <td><div align="center"><span class="style8">下 载</span></div></td>
        <td><div align="center"><strong>收 藏</strong></div></td>
        <td><div align="center"><strong>转 发</strong></div></td>
        <td><div align="center" class="style8">
            <div align="center">共享人</div>
        </div></td>
        <td><div align="center"><span class="style8">部 门</span></div></td>
      </tr>
      <%
          string where = "f_isshare=1";
          System.Collections.Generic.IList<COM.OA.Entity.files> list = COM.OA.BLL.filesBLL.Select(where,true,false);
          
          foreach (COM.OA.Entity.files f in list)
          {


              System.IO.FileInfo info = new System.IO.FileInfo(Server.MapPath("../gxxz/upload/" + f.f_filename));
              COM.OA.Entity.employee em = COM.OA.BLL.employeeBLL.Select(f.users.u_em_id);
              int start = f.f_filename.LastIndexOf(".")+1;
              string hz = f.f_filename.Substring(start);
              string imgPath = "../gxxz/img/icon/" + hz + ".gif";
              
              
      %>


<tr bgcolor="#FFFFFF" onmouseover = "this.style.backgroundColor = '#EEEEEE'" onmouseout = "this.style.backgroundColor = ''">
    <td style="height: 25px"><div align="left" class="style5">&nbsp;<img src="<%=imgPath %>" width="16" height="16"/> <a href="openfile.aspx?fid=<%=f.f_id %>" target="_blank" title="">
          <%=f.f_filename%></a>
          <span class="style9"><%=f.f_releasetime %></span> <span class="style9">(<%=f.filetype.ftype_filetype %>)</span>
		  
          </div></td>
    <td style="height: 25px"><div align="center"><%=info.Length/10*0.01%>KB</div></td>
    <td style="height: 25px"><div align="center"><a href="downfile.aspx?id=<%=f.f_id %>&n=<%=f.f_filename %>">下载</a></div></td>
    <td style="height: 25px"><div align="center"><a href="shoucang.aspx?id=<%=f.f_id %>&n=<%=f.f_filename %>">收藏</a></div></td>
    <td style="height: 25px"><div align="center"><a href="zhuanfa.aspx?id=<%=f.f_id %>">转发</a></div></td>
    <td style="height: 25px"><div align="center" class="style5">
        <div align="center"><%=em.em_name %></div>
            </div></td>
    <td style="height: 25px"><div align="center"><span class="style5"><%=f.department.dept_department %></span></div></td>
</tr>


    <%
        Session.Add("count",list.Count);
          } 
    %>

</table>
    
    

<p align="center">&nbsp;(共<%=Session["count"] %>条记录)<br/>
  <br/>
<img src="../images/gx/up.gif" width="17" height="12"> <a href="javascript:history.go(-1)">返 回</a></p>
        <table border="0" width="38%" align="center">
      <tr>
        <td width="32%" align="center" style="height: 17px">
        </td>
        <td width="22%" align="center" style="height: 17px">
        </td>
        <td width="16%" align="center" style="height: 17px">
        </td>
        <td width="30%" align="center" style="height: 17px">
        </td>
      </tr>
    </table>
        <div align="center"></div>
<div align="center">
      <p>&nbsp;</p>
      
      
</div>
    
    <div align="center">
</div>
     <p class="style2">&nbsp;</p>
</body>
</html>
